<?php

//require_once  __DIR__ . '/includes/authenticate.php';

if (isset($_POST['season']) && isset($_POST['gamenumber']) && isset($_POST['playerID']) && isset($_POST['quarter']) ) {

	include_once './db_bb_connect.php';
	
	$season = $_POST['season'];
	$gamenumber = $_POST['gamenumber'];
	$playerID = $_POST['playerID'];
	$quarter = $_POST['quarter'];

	$sql = "DELETE FROM stats_game_quarter 
	WHERE playerID = '$playerID'
	AND gamenumber = '$gamenumber'
	AND season = '$season'
	AND quarter = '$quarter'";

	if ($db->query($sql)) {
		echo "<center> Entry Successfully Deleted! </center>";
	} else {
		echo "<center>Delete failed</center>";
	}

} else {
	echo "<center>Something went wront, delete entry failed</center>";
}

?>

